/*
 * Copyright (C) 2006 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.view;

/** Interface to let you add and remove child views to an Activity.
 * 允许您添加和删除子视图到Activity的接口。
 * 要获得此类的实例，请调用{@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}.
  */
public interface ViewManager
{
    /**
     * 将传递的布局参数分配给传递的视图并将视图添加到窗口。
     *
     * 抛出{@link android.view.WindowManager.BadTokenException} ，以防止某些编程错误，
     * 例如在不删除第一个视图的情况下向窗口添加第二个视图。
     *
     * 抛出{ {@link android.view.WindowManager.InvalidDisplayException} 如果窗口位于次要{@link Display}
     * 并且无法找到指定的显示(see {@link android.app.Presentation}).
     * @param view 要添加到此窗口的视图
     * @param params 分配给view的布局参数
     */
    public void addView(View view, ViewGroup.LayoutParams params);
    public void updateViewLayout(View view, ViewGroup.LayoutParams params);
    public void removeView(View view);
}
